<template>
   
    
</template>

<script>

import Vue from 'vue'
import VueRouter from 'vue-router'
import Menus from './components/Menu'
import Add from './components/Add'
import Mine from './components/Mine'
import Home from './components/Home'


Vue.use(VueRouter)
const router = new VueRouter({
  mode: '',
  base: __dirname,
  data:{
  
  },
  routes: [
    { path: '/', name: 'home', component: Home },
    { path: '/Add', name: 'add', component: Add },
    { path: '/Mine', name: 'mine', component: Mine }
  ]
})
new Vue({
  
  router,
   components: {
    Menus,Add,Mine,Home
  },
  template: `
    <div id="ap">
       <menus v-on:show-what="geet"></menus>
       <router-view class="view"></router-view>
    </div>
  `,
  methods: {
     geet:function (msg) {
      router.push({ name: msg});
     }
    }

}).$mount('#app')
</script>

<style>
.view{
  margin-top: 40px;
}
</style>
